package com.training.java.core.collections.post15.Set.CellPhone;

import java.util.HashSet;
import java.util.Set;

public class CellPhoneSetDemo {

	public static void main(String[] args) {
		CellPhone mobile1 = new CellPhone("Apple", "iPhone5S", "ios");
		CellPhone mobile2 = new CellPhone("Samsung", "Galaxy2", "Android");
		CellPhone mobile3 = new CellPhone("Nokia", "S200", "Windows");
		CellPhone mobile4 = new CellPhone("Nokia", "S200", "Windows");
		CellPhone mobile5 = new CellPhone("Apple", "iPhone5S", "ios5");

		Set<CellPhone> mobiles = new HashSet<CellPhone>();

		mobiles.add(mobile1);
		mobiles.add(mobile2);
		mobiles.add(mobile3);
		mobiles.add(mobile4);
		mobiles.add(mobile5);

		for (CellPhone aCellPhone : mobiles) {

			System.out.println("Company = " + aCellPhone.getCompany());

			System.out.println("Model = " + aCellPhone.getModel());
			System.out.println("Operating System = "
					+ aCellPhone.getOperatingSystem());

		}

	}

}
